package cn.iocoder.yudao.module.eval.dal.mysql.personnellist;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.personnellist.PersonnelListDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.personnellist.vo.*;

/**
 * 人员名单 Mapper
 *
 * @author 龙头企业
 */
@Mapper
public interface PersonnelListMapper extends BaseMapperX<PersonnelListDO> {

    default PageResult<PersonnelListDO> selectPage(PersonnelListPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PersonnelListDO>()
                .likeIfPresent(PersonnelListDO::getName, reqVO.getName())
                .eqIfPresent(PersonnelListDO::getEducation, reqVO.getEducation())
                .eqIfPresent(PersonnelListDO::getVocationalQualification, reqVO.getVocationalQualification())
                .eqIfPresent(PersonnelListDO::getTitle, reqVO.getTitle())
                .eqIfPresent(PersonnelListDO::getDuty, reqVO.getDuty())
                .eqIfPresent(PersonnelListDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(PersonnelListDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PersonnelListDO::getId));
    }

}